﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbFactory
{
    internal class CareerFactory : BaseFactory<Career>
    {
        static internal Career laywer, coder;

        internal static void Create()
        {
            laywer = newCareer(new Career {
                BirthYear = 1981,
                City = "沙坪坝",
                Description = "我是一个律师，……",
                From = DateTime.Now.AddDays(1),
                To = DateTime.Now.AddDays(30),
                Gender = true,
                KeyWords = "律师 法务 法律",
                Offer = true,
                Province = "重庆",
                User = UserFactory.fg
            });

            coder = newCareer(new Career
            {
                BirthYear = 1997,
                City = "成都",
                Description = "我想体验程序媛的工作，……",
                From = DateTime.Now.AddDays(5),
                To = DateTime.Now.AddDays(60),
                Gender = false,
                KeyWords = "程序媛 开发 编程",
                Offer = false,
                Province = "四川",
                User = UserFactory.xj
            });

        }

        static Career newCareer(Career career)
        {
            return Save(career);
        }
    }
}
